import request from '@/utils/request'

// 查询定时任务执行信息列表
export function listExecutionJob(query) {
    return request({
        url: '/tms/job/execution/',
        method: 'get',
        params: query
    });
}

// 查询定时任务执行信息
export function getExecutionJob(id) {
    return request({
        url: `/tms/job/execution/${id}/`,
        method: 'get',
    });
}

// 获取定时任务执行结果
export function getExecutionJobResult(id) {
    return request({
        url: `/tms/job/execution/${id}/result/`,
        method: 'get'
    });
}

// 修改定时任务执行信息
export function updateExecutionJob(data) {
    return request({
        url: `/tms/job/execution/${data.id}/`,
        method: 'put',
        data: data,
    });
}

// 删除定时任务执行信息
export function delExecutionJob(id) {
    return request({
        url: `/tms/job/execution/${id}/`,
        method: 'delete'
    });
}